<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>简单的Vue计数</title>
  <script src="./vue.js"></script>
  <script src="./vuex.js"></script>
  <style>
    #app {
      text-align: center;
      margin-top: 50px;
    }
    button {
      padding: 10px 20px;
      font-size: 16px;
      background-color: #007bff;
      color: #fff;
      border: 1px solid #007bff;
      border-radius: 3px;
      cursor: pointer;
    }
    button:hover {
      background-color: #0056b3;
    }
  </style>
</head>
<body>
<div id="app"></div>
<script>
  var vm = new Vue({
	  el: '#app',
      // state
      data () {
        return {
          count: 1
        }
      },
      // view
      template: `
        <div><button @click="increment()" >单击增加1</button>
             {{ count }}
	    </div>
      `,
      // actions
      methods: {
        increment () {
          this.count++
        }
     }
  })
</script>
</body>
</html>